import 'package:flutter/material.dart';

class CategoryPage extends StatefulWidget {
  CategoryPage({Key key}) : super(key: key);
  @override
  _CategoryPageState createState() => _CategoryPageState();
}

class _CategoryPageState extends State<CategoryPage> {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
        length: 2,
        child: Scaffold(
          appBar: AppBar(
            // title: TabBar(
            //   tabs: [Text('最热'), Text('最新')],
            // ),
            title: Container(
              child: Text('aa'),
              height: 30,
            ),
          ),
          body: TabBarView(
            children: [
              ListView(
                children: [
                  ListTile(
                    title: Text('aaa'),
                  ),
                  ListTile(
                    title: Text('aaa'),
                  ),
                  ListTile(
                    title: Text('aaa'),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text('bbb'),
                  ),
                  ListTile(
                    title: Text('bbb'),
                  ),
                  ListTile(
                    title: Text('bbb'),
                  ),
                ],
              ),
            ],
          ),
        ));
  }
}
